<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE DeriveDataTypeable #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE DeriveGeneric #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE FlexibleContexts #-}</span><span>
</span><span id="line-4"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- Module      :  Distribution.Simple.Flag</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Copyright   :  Isaac Jones 2003-2004</span><span>
</span><span id="line-8"></span><span class="hs-comment">--                Duncan Coutts 2007</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- License     :  BSD3</span><span>
</span><span id="line-10"></span><span class="hs-comment">--</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Maintainer  :  cabal-devel@haskell.org</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-13"></span><span class="hs-comment">--</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- Defines the 'Flag' type and it's 'Monoid' instance,  see</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- &lt;http://www.haskell.org/pipermail/cabal-devel/2007-December/001509.html&gt;</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- for an explanation.</span><span>
</span><span id="line-17"></span><span class="hs-comment">--</span><span>
</span><span id="line-18"></span><span class="hs-comment">-- Split off from &quot;Distribution.Simple.Setup&quot; to break import cycles.</span><span>
</span><span id="line-19"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Distribution.Simple.Flag</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-20"></span><span>  </span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier">Flag</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>  </span><span class="annot"><a href="Distribution.Simple.Flag.html#allFlags"><span class="hs-identifier">allFlags</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>  </span><span class="annot"><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier">toFlag</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-23"></span><span>  </span><span class="annot"><a href="Distribution.Simple.Flag.html#fromFlag"><span class="hs-identifier">fromFlag</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>  </span><span class="annot"><a href="Distribution.Simple.Flag.html#fromFlagOrDefault"><span class="hs-identifier">fromFlagOrDefault</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>  </span><span class="annot"><a href="Distribution.Simple.Flag.html#flagElim"><span class="hs-identifier">flagElim</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-26"></span><span>  </span><span class="annot"><a href="Distribution.Simple.Flag.html#flagToMaybe"><span class="hs-identifier">flagToMaybe</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-27"></span><span>  </span><span class="annot"><a href="Distribution.Simple.Flag.html#flagToList"><span class="hs-identifier">flagToList</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-28"></span><span>  </span><span class="annot"><a href="Distribution.Simple.Flag.html#maybeToFlag"><span class="hs-identifier">maybeToFlag</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>  </span><span class="annot"><a href="Distribution.Simple.Flag.html#BooleanFlag"><span class="hs-identifier">BooleanFlag</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Prelude.html"><span class="hs-identifier">Distribution.Compat.Prelude</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../binary/src/Data.Binary.Class.html#get"><span class="hs-identifier">get</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Stack.html"><span class="hs-identifier">Distribution.Compat.Stack</span></a></span><span>
</span><span id="line-34"></span><span>
</span><span id="line-35"></span><span class="hs-comment">-- ------------------------------------------------------------</span><span>
</span><span id="line-36"></span><span class="hs-comment">-- * Flag type</span><span>
</span><span id="line-37"></span><span class="hs-comment">-- ------------------------------------------------------------</span><span>
</span><span id="line-38"></span><span>
</span><span id="line-39"></span><span class="hs-comment">-- | All flags are monoids, they come in two flavours:</span><span>
</span><span id="line-40"></span><span class="hs-comment">--</span><span>
</span><span id="line-41"></span><span class="hs-comment">-- 1. list flags eg</span><span>
</span><span id="line-42"></span><span class="hs-comment">--</span><span>
</span><span id="line-43"></span><span class="hs-comment">-- &gt; --ghc-option=foo --ghc-option=bar</span><span>
</span><span id="line-44"></span><span class="hs-comment">--</span><span>
</span><span id="line-45"></span><span class="hs-comment">-- gives us all the values [&quot;foo&quot;, &quot;bar&quot;]</span><span>
</span><span id="line-46"></span><span class="hs-comment">--</span><span>
</span><span id="line-47"></span><span class="hs-comment">-- 2. singular value flags, eg:</span><span>
</span><span id="line-48"></span><span class="hs-comment">--</span><span>
</span><span id="line-49"></span><span class="hs-comment">-- &gt; --enable-foo --disable-foo</span><span>
</span><span id="line-50"></span><span class="hs-comment">--</span><span>
</span><span id="line-51"></span><span class="hs-comment">-- gives us Just False</span><span>
</span><span id="line-52"></span><span class="hs-comment">-- So this Flag type is for the latter singular kind of flag.</span><span>
</span><span id="line-53"></span><span class="hs-comment">-- Its monoid instance gives us the behaviour where it starts out as</span><span>
</span><span id="line-54"></span><span class="hs-comment">-- 'NoFlag' and later flags override earlier ones.</span><span>
</span><span id="line-55"></span><span class="hs-comment">--</span><span>
</span><span id="line-56"></span><span id="local-6989586621679619586"><span id="local-6989586621679619587"></span></span><span class="hs-keyword">data</span><span> </span><span id="Flag"><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-var">Flag</span></a></span></span><span> </span><span id="local-6989586621679619786"><span class="annot"><a href="#local-6989586621679619786"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Flag"><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-var">Flag</span></a></span></span><span> </span><span class="annot"><a href="#local-6989586621679619786"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="NoFlag"><span class="annot"><a href="Distribution.Simple.Flag.html#NoFlag"><span class="hs-identifier hs-var">NoFlag</span></a></span></span><span> </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679619579"><span id="local-6989586621679619582"><span class="annot"><span class="annottext">Flag a -&gt; Flag a -&gt; Bool
(Flag a -&gt; Flag a -&gt; Bool)
-&gt; (Flag a -&gt; Flag a -&gt; Bool) -&gt; Eq (Flag a)
forall a. Eq a =&gt; Flag a -&gt; Flag a -&gt; Bool
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: Flag a -&gt; Flag a -&gt; Bool
$c/= :: forall a. Eq a =&gt; Flag a -&gt; Flag a -&gt; Bool
== :: Flag a -&gt; Flag a -&gt; Bool
$c== :: forall a. Eq a =&gt; Flag a -&gt; Flag a -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(forall x. Flag a -&gt; Rep (Flag a) x)
-&gt; (forall x. Rep (Flag a) x -&gt; Flag a) -&gt; Generic (Flag a)
forall x. Rep (Flag a) x -&gt; Flag a
forall x. Flag a -&gt; Rep (Flag a) x
forall a.
(forall x. a -&gt; Rep a x) -&gt; (forall x. Rep a x -&gt; a) -&gt; Generic a
forall a x. Rep (Flag a) x -&gt; Flag a
forall a x. Flag a -&gt; Rep (Flag a) x
$cto :: forall a x. Rep (Flag a) x -&gt; Flag a
$cfrom :: forall a x. Flag a -&gt; Rep (Flag a) x
</span><a href="../../base/src/GHC.Generics.html#Generic"><span class="hs-identifier hs-var hs-var hs-var hs-var">Generic</span></a></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679619566"><span id="local-6989586621679619568"><span id="local-6989586621679619573"><span class="annot"><span class="annottext">Int -&gt; Flag a -&gt; ShowS
[Flag a] -&gt; ShowS
Flag a -&gt; String
(Int -&gt; Flag a -&gt; ShowS)
-&gt; (Flag a -&gt; String) -&gt; ([Flag a] -&gt; ShowS) -&gt; Show (Flag a)
forall a. Show a =&gt; Int -&gt; Flag a -&gt; ShowS
forall a. Show a =&gt; [Flag a] -&gt; ShowS
forall a. Show a =&gt; Flag a -&gt; String
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [Flag a] -&gt; ShowS
$cshowList :: forall a. Show a =&gt; [Flag a] -&gt; ShowS
show :: Flag a -&gt; String
$cshow :: forall a. Show a =&gt; Flag a -&gt; String
showsPrec :: Int -&gt; Flag a -&gt; ShowS
$cshowsPrec :: forall a. Show a =&gt; Int -&gt; Flag a -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679619549"><span id="local-6989586621679619558"><span id="local-6989586621679619561"><span id="local-6989586621679619563"><span class="annot"><span class="annottext">ReadPrec [Flag a]
ReadPrec (Flag a)
Int -&gt; ReadS (Flag a)
ReadS [Flag a]
(Int -&gt; ReadS (Flag a))
-&gt; ReadS [Flag a]
-&gt; ReadPrec (Flag a)
-&gt; ReadPrec [Flag a]
-&gt; Read (Flag a)
forall a. Read a =&gt; ReadPrec [Flag a]
forall a. Read a =&gt; ReadPrec (Flag a)
forall a. Read a =&gt; Int -&gt; ReadS (Flag a)
forall a. Read a =&gt; ReadS [Flag a]
forall a.
(Int -&gt; ReadS a)
-&gt; ReadS [a] -&gt; ReadPrec a -&gt; ReadPrec [a] -&gt; Read a
readListPrec :: ReadPrec [Flag a]
$creadListPrec :: forall a. Read a =&gt; ReadPrec [Flag a]
readPrec :: ReadPrec (Flag a)
$creadPrec :: forall a. Read a =&gt; ReadPrec (Flag a)
readList :: ReadS [Flag a]
$creadList :: forall a. Read a =&gt; ReadS [Flag a]
readsPrec :: Int -&gt; ReadS (Flag a)
$creadsPrec :: forall a. Read a =&gt; Int -&gt; ReadS (Flag a)
</span><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Read</span></a></span></span></span></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Typeable.Internal.html#Typeable"><span class="hs-identifier hs-type">Typeable</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-57"></span><span>
</span><span id="line-58"></span><span id="local-6989586621679619776"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679619541"><span id="local-6989586621679619543"><span id="local-6989586621679619545"><span class="annot"><a href="../../binary/src/Data.Binary.Class.html#Binary"><span class="hs-identifier hs-type">Binary</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679619776"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../binary/src/Data.Binary.Class.html#Binary"><span class="hs-identifier hs-type">Binary</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679619776"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span></span></span><span>
</span><span id="line-59"></span><span id="local-6989586621679619770"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679619533"><span id="local-6989586621679619535"><span class="annot"><a href="Distribution.Utils.Structured.html#Structured"><span class="hs-identifier hs-type">Structured</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679619770"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Distribution.Utils.Structured.html#Structured"><span class="hs-identifier hs-type">Structured</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679619770"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span></span><span>
</span><span id="line-60"></span><span>
</span><span id="line-61"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679619529"><span class="annot"><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-type">Functor</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-62"></span><span>  </span><span id="local-6989586621679619527"><span class="annot"><span class="annottext">fmap :: forall a b. (a -&gt; b) -&gt; Flag a -&gt; Flag b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var hs-var hs-var hs-var">fmap</span></a></span></span><span> </span><span id="local-6989586621679619526"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679619526"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span id="local-6989586621679619525"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619525"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">b -&gt; Flag b
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-var">Flag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679619526"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619525"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-63"></span><span>  </span><span class="annot"><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Flag a
</span><a href="Distribution.Simple.Flag.html#NoFlag"><span class="hs-identifier hs-var">NoFlag</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag b
forall a. Flag a
</span><a href="Distribution.Simple.Flag.html#NoFlag"><span class="hs-identifier hs-var">NoFlag</span></a></span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679619515"><span id="local-6989586621679619517"><span id="local-6989586621679619519"><span class="annot"><a href="../../base/src/GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-66"></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span id="local-6989586621679619512"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679619512"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679619511"><span class="annot"><span class="annottext">&lt;*&gt; :: forall a b. Flag (a -&gt; b) -&gt; Flag a -&gt; Flag b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;*&gt;</span></a></span></span><span> </span><span id="local-6989586621679619510"><span class="annot"><span class="annottext">Flag a
</span><a href="#local-6989586621679619510"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679619512"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; Flag a -&gt; Flag b
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Flag a
</span><a href="#local-6989586621679619510"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-67"></span><span>  </span><span class="annot"><span class="annottext">Flag (a -&gt; b)
</span><a href="Distribution.Simple.Flag.html#NoFlag"><span class="hs-identifier hs-var">NoFlag</span></a></span><span>   </span><span class="annot"><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var">&lt;*&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Flag a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag b
forall a. Flag a
</span><a href="Distribution.Simple.Flag.html#NoFlag"><span class="hs-identifier hs-var">NoFlag</span></a></span><span>
</span><span id="line-68"></span><span>  </span><span id="local-6989586621679619508"><span class="annot"><span class="annottext">pure :: forall a. a -&gt; Flag a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var hs-var hs-var hs-var">pure</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Flag a
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-var">Flag</span></a></span><span>
</span><span id="line-69"></span><span>
</span><span id="line-70"></span><span id="local-6989586621679619744"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679619502"><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679619744"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-71"></span><span>  </span><span id="local-6989586621679619500"><span class="annot"><span class="annottext">mempty :: Flag a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var hs-var hs-var hs-var">mempty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag a
forall a. Flag a
</span><a href="Distribution.Simple.Flag.html#NoFlag"><span class="hs-identifier hs-var">NoFlag</span></a></span><span>
</span><span id="line-72"></span><span>  </span><span id="local-6989586621679619498"><span class="annot"><span class="annottext">mappend :: Flag a -&gt; Flag a -&gt; Flag a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-identifier hs-var hs-var hs-var hs-var">mappend</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag a -&gt; Flag a -&gt; Flag a
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">(&lt;&gt;)</span></a></span></span><span>
</span><span id="line-73"></span><span>
</span><span id="line-74"></span><span id="local-6989586621679619497"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679619492"><span id="local-6989586621679619494"><span class="annot"><a href="../../base/src/GHC.Base.html#Semigroup"><span class="hs-identifier hs-type">Semigroup</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679619497"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-75"></span><span>  </span><span class="annot"><span class="annottext">Flag a
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679619490"><span class="annot"><span class="annottext">&lt;&gt; :: Flag a -&gt; Flag a -&gt; Flag a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;&gt;</span></a></span></span><span> </span><span id="local-6989586621679619489"><span class="annot"><span class="annottext">f :: Flag a
</span><a href="#local-6989586621679619489"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag a
</span><a href="#local-6989586621679619489"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-76"></span><span>  </span><span id="local-6989586621679619488"><span class="annot"><span class="annottext">Flag a
</span><a href="#local-6989586621679619488"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Flag a
</span><a href="Distribution.Simple.Flag.html#NoFlag"><span class="hs-identifier hs-var">NoFlag</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag a
</span><a href="#local-6989586621679619488"><span class="hs-identifier hs-var">f</span></a></span></span><span>
</span><span id="line-77"></span><span>
</span><span id="line-78"></span><span id="local-6989586621679619738"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../base/src/GHC.Enum.html#Bounded"><span class="hs-identifier hs-type">Bounded</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679619738"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Enum.html#Bounded"><span class="hs-identifier hs-type">Bounded</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679619738"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-79"></span><span>  </span><span id="local-6989586621679619481"><span class="annot"><span class="annottext">minBound :: Flag a
</span><a href="../../base/src/GHC.Enum.html#minBound"><span class="hs-identifier hs-var hs-var hs-var hs-var">minBound</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Flag a
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">a
forall a. Bounded a =&gt; a
</span><a href="../../base/src/GHC.Enum.html#minBound"><span class="hs-identifier hs-var">minBound</span></a></span><span>
</span><span id="line-80"></span><span>  </span><span id="local-6989586621679619478"><span class="annot"><span class="annottext">maxBound :: Flag a
</span><a href="../../base/src/GHC.Enum.html#maxBound"><span class="hs-identifier hs-var hs-var hs-var hs-var">maxBound</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Flag a
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">a
forall a. Bounded a =&gt; a
</span><a href="../../base/src/GHC.Enum.html#maxBound"><span class="hs-identifier hs-var">maxBound</span></a></span></span><span>
</span><span id="line-81"></span><span>
</span><span id="line-82"></span><span id="local-6989586621679619736"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679619473"><span id="local-6989586621679619475"><span class="annot"><a href="../../base/src/GHC.Enum.html#Enum"><span class="hs-identifier hs-type">Enum</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679619736"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Enum.html#Enum"><span class="hs-identifier hs-type">Enum</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679619736"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-83"></span><span>  </span><span id="local-6989586621679619462"><span class="annot"><span class="annottext">fromEnum :: Flag a -&gt; Int
</span><a href="../../base/src/GHC.Enum.html#fromEnum"><span class="hs-identifier hs-var hs-var hs-var hs-var">fromEnum</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Int
forall a. Enum a =&gt; a -&gt; Int
</span><a href="../../base/src/GHC.Enum.html#fromEnum"><span class="hs-identifier hs-var">fromEnum</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; Int) -&gt; (Flag a -&gt; a) -&gt; Flag a -&gt; Int
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Flag a -&gt; a
forall a. WithCallStack (Flag a -&gt; a)
</span><a href="Distribution.Simple.Flag.html#fromFlag"><span class="hs-identifier hs-var">fromFlag</span></a></span><span>
</span><span id="line-84"></span><span>  </span><span id="local-6989586621679619458"><span class="annot"><span class="annottext">toEnum :: Int -&gt; Flag a
</span><a href="../../base/src/GHC.Enum.html#toEnum"><span class="hs-identifier hs-var hs-var hs-var hs-var">toEnum</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Flag a
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span>   </span><span class="annot"><span class="annottext">(a -&gt; Flag a) -&gt; (Int -&gt; a) -&gt; Int -&gt; Flag a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; a
forall a. Enum a =&gt; Int -&gt; a
</span><a href="../../base/src/GHC.Enum.html#toEnum"><span class="hs-identifier hs-var">toEnum</span></a></span><span>
</span><span id="line-85"></span><span>  </span><span id="local-6989586621679619455"><span class="annot"><span class="annottext">enumFrom :: Flag a -&gt; [Flag a]
</span><a href="../../base/src/GHC.Enum.html#enumFrom"><span class="hs-identifier hs-var hs-var hs-var hs-var">enumFrom</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span id="local-6989586621679619454"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619454"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Flag a) -&gt; [a] -&gt; [Flag a]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Flag a
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">([a] -&gt; [Flag a]) -&gt; (a -&gt; [a]) -&gt; a -&gt; [Flag a]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a]
forall a. Enum a =&gt; a -&gt; [a]
</span><a href="../../base/src/GHC.Enum.html#enumFrom"><span class="hs-identifier hs-var">enumFrom</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; [Flag a]) -&gt; a -&gt; [Flag a]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619454"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-86"></span><span>  </span><span class="annot"><a href="../../base/src/GHC.Enum.html#enumFrom"><span class="hs-identifier hs-var">enumFrom</span></a></span><span> </span><span class="annot"><span class="annottext">Flag a
</span><span class="hs-identifier">_</span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-87"></span><span>  </span><span id="local-6989586621679619452"><span class="annot"><span class="annottext">enumFromThen :: Flag a -&gt; Flag a -&gt; [Flag a]
</span><a href="../../base/src/GHC.Enum.html#enumFromThen"><span class="hs-identifier hs-var hs-var hs-var hs-var">enumFromThen</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span id="local-6989586621679619451"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619451"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span id="local-6989586621679619450"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619450"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Flag a
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; Flag a) -&gt; [a] -&gt; [Flag a]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-operator hs-var">`map`</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; [a]
forall a. Enum a =&gt; a -&gt; a -&gt; [a]
</span><a href="../../base/src/GHC.Enum.html#enumFromThen"><span class="hs-identifier hs-var">enumFromThen</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619451"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619450"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-88"></span><span>  </span><span class="annot"><a href="../../base/src/GHC.Enum.html#enumFromThen"><span class="hs-identifier hs-var">enumFromThen</span></a></span><span> </span><span class="annot"><span class="annottext">Flag a
</span><span class="hs-identifier">_</span></span><span>        </span><span class="annot"><span class="annottext">Flag a
</span><span class="hs-identifier">_</span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-89"></span><span>  </span><span id="local-6989586621679619448"><span class="annot"><span class="annottext">enumFromTo :: Flag a -&gt; Flag a -&gt; [Flag a]
</span><a href="../../base/src/GHC.Enum.html#enumFromTo"><span class="hs-identifier hs-var hs-var hs-var hs-var">enumFromTo</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span id="local-6989586621679619447"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619447"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span id="local-6989586621679619446"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619446"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Flag a
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; Flag a) -&gt; [a] -&gt; [Flag a]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-operator hs-var">`map`</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; [a]
forall a. Enum a =&gt; a -&gt; a -&gt; [a]
</span><a href="../../base/src/GHC.Enum.html#enumFromTo"><span class="hs-identifier hs-var">enumFromTo</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619447"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619446"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-90"></span><span>  </span><span class="annot"><a href="../../base/src/GHC.Enum.html#enumFromTo"><span class="hs-identifier hs-var">enumFromTo</span></a></span><span>   </span><span class="annot"><span class="annottext">Flag a
</span><span class="hs-identifier">_</span></span><span>        </span><span class="annot"><span class="annottext">Flag a
</span><span class="hs-identifier">_</span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-91"></span><span>  </span><span id="local-6989586621679619444"><span class="annot"><span class="annottext">enumFromThenTo :: Flag a -&gt; Flag a -&gt; Flag a -&gt; [Flag a]
</span><a href="../../base/src/GHC.Enum.html#enumFromThenTo"><span class="hs-identifier hs-var hs-var hs-var hs-var">enumFromThenTo</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span id="local-6989586621679619443"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619443"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span id="local-6989586621679619442"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619442"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span id="local-6989586621679619441"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619441"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Flag a
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; Flag a) -&gt; [a] -&gt; [Flag a]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-operator hs-var">`map`</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a -&gt; [a]
forall a. Enum a =&gt; a -&gt; a -&gt; a -&gt; [a]
</span><a href="../../base/src/GHC.Enum.html#enumFromThenTo"><span class="hs-identifier hs-var">enumFromThenTo</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619443"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619442"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619441"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-92"></span><span>  </span><span class="annot"><a href="../../base/src/GHC.Enum.html#enumFromThenTo"><span class="hs-identifier hs-var">enumFromThenTo</span></a></span><span> </span><span class="annot"><span class="annottext">Flag a
</span><span class="hs-identifier">_</span></span><span>        </span><span class="annot"><span class="annottext">Flag a
</span><span class="hs-identifier">_</span></span><span>        </span><span class="annot"><span class="annottext">Flag a
</span><span class="hs-identifier">_</span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span></span><span>
</span><span id="line-93"></span><span>
</span><span id="line-94"></span><span id="local-6989586621679619440"><span class="annot"><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-type">toFlag</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679619440"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679619440"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-95"></span><span id="toFlag"><span class="annot"><span class="annottext">toFlag :: forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var hs-var">toFlag</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Flag a
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-var">Flag</span></a></span><span>
</span><span id="line-96"></span><span>
</span><span id="line-97"></span><span id="local-6989586621679619731"><span class="annot"><a href="Distribution.Simple.Flag.html#fromFlag"><span class="hs-identifier hs-type">fromFlag</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Compat.Stack.html#WithCallStack"><span class="hs-identifier hs-type">WithCallStack</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679619731"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679619731"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-98"></span><span id="fromFlag"><span class="annot"><span class="annottext">fromFlag :: forall a. WithCallStack (Flag a -&gt; a)
</span><a href="Distribution.Simple.Flag.html#fromFlag"><span class="hs-identifier hs-var hs-var">fromFlag</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span id="local-6989586621679619436"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619436"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619436"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-99"></span><span class="annot"><a href="Distribution.Simple.Flag.html#fromFlag"><span class="hs-identifier hs-var">fromFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Flag a
</span><a href="Distribution.Simple.Flag.html#NoFlag"><span class="hs-identifier hs-var">NoFlag</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; a
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;fromFlag NoFlag. Use fromFlagOrDefault&quot;</span></span><span>
</span><span id="line-100"></span><span>
</span><span id="line-101"></span><span id="local-6989586621679619719"><span class="annot"><a href="Distribution.Simple.Flag.html#fromFlagOrDefault"><span class="hs-identifier hs-type">fromFlagOrDefault</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679619719"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679619719"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679619719"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-102"></span><span id="fromFlagOrDefault"><span class="annot"><span class="annottext">fromFlagOrDefault :: forall a. a -&gt; Flag a -&gt; a
</span><a href="Distribution.Simple.Flag.html#fromFlagOrDefault"><span class="hs-identifier hs-var hs-var">fromFlagOrDefault</span></a></span></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span id="local-6989586621679619434"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619434"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619434"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-103"></span><span class="annot"><a href="Distribution.Simple.Flag.html#fromFlagOrDefault"><span class="hs-identifier hs-var">fromFlagOrDefault</span></a></span><span> </span><span id="local-6989586621679619433"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619433"><span class="hs-identifier hs-var">def</span></a></span></span><span> </span><span class="annot"><span class="annottext">Flag a
</span><a href="Distribution.Simple.Flag.html#NoFlag"><span class="hs-identifier hs-var">NoFlag</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619433"><span class="hs-identifier hs-var">def</span></a></span><span>
</span><span id="line-104"></span><span>
</span><span id="line-105"></span><span id="local-6989586621679619717"><span class="annot"><a href="Distribution.Simple.Flag.html#flagToMaybe"><span class="hs-identifier hs-type">flagToMaybe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679619717"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679619717"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-106"></span><span id="flagToMaybe"><span class="annot"><span class="annottext">flagToMaybe :: forall a. Flag a -&gt; Maybe a
</span><a href="Distribution.Simple.Flag.html#flagToMaybe"><span class="hs-identifier hs-var hs-var">flagToMaybe</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span id="local-6989586621679619432"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619432"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619432"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-107"></span><span class="annot"><a href="Distribution.Simple.Flag.html#flagToMaybe"><span class="hs-identifier hs-var">flagToMaybe</span></a></span><span> </span><span class="annot"><span class="annottext">Flag a
</span><a href="Distribution.Simple.Flag.html#NoFlag"><span class="hs-identifier hs-var">NoFlag</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe a
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-108"></span><span>
</span><span id="line-109"></span><span class="hs-comment">-- | @since 3.4.0.0</span><span>
</span><span id="line-110"></span><span id="local-6989586621679619714"><span id="local-6989586621679619715"><span class="annot"><a href="Distribution.Simple.Flag.html#flagElim"><span class="hs-identifier hs-type">flagElim</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679619715"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679619714"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679619715"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679619714"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679619715"><span class="hs-identifier hs-type">b</span></a></span></span></span><span>
</span><span id="line-111"></span><span id="flagElim"><span class="annot"><span class="annottext">flagElim :: forall b a. b -&gt; (a -&gt; b) -&gt; Flag a -&gt; b
</span><a href="Distribution.Simple.Flag.html#flagElim"><span class="hs-identifier hs-var hs-var">flagElim</span></a></span></span><span> </span><span id="local-6989586621679619431"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679619431"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="annot"><span class="annottext">a -&gt; b
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Flag a
</span><a href="Distribution.Simple.Flag.html#NoFlag"><span class="hs-identifier hs-var">NoFlag</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679619431"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-112"></span><span class="annot"><a href="Distribution.Simple.Flag.html#flagElim"><span class="hs-identifier hs-var">flagElim</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679619430"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679619430"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span id="local-6989586621679619429"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619429"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679619430"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619429"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-113"></span><span>
</span><span id="line-114"></span><span id="local-6989586621679619711"><span class="annot"><a href="Distribution.Simple.Flag.html#flagToList"><span class="hs-identifier hs-type">flagToList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679619711"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679619711"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-115"></span><span id="flagToList"><span class="annot"><span class="annottext">flagToList :: forall a. Flag a -&gt; [a]
</span><a href="Distribution.Simple.Flag.html#flagToList"><span class="hs-identifier hs-var hs-var">flagToList</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span id="local-6989586621679619428"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619428"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619428"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-116"></span><span class="annot"><a href="Distribution.Simple.Flag.html#flagToList"><span class="hs-identifier hs-var">flagToList</span></a></span><span> </span><span class="annot"><span class="annottext">Flag a
</span><a href="Distribution.Simple.Flag.html#NoFlag"><span class="hs-identifier hs-var">NoFlag</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-117"></span><span>
</span><span id="line-118"></span><span class="annot"><a href="Distribution.Simple.Flag.html#allFlags"><span class="hs-identifier hs-type">allFlags</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-119"></span><span id="allFlags"><span class="annot"><span class="annottext">allFlags :: [Flag Bool] -&gt; Flag Bool
</span><a href="Distribution.Simple.Flag.html#allFlags"><span class="hs-identifier hs-var hs-var">allFlags</span></a></span></span><span> </span><span id="local-6989586621679619427"><span class="annot"><span class="annottext">[Flag Bool]
</span><a href="#local-6989586621679619427"><span class="hs-identifier hs-var">flags</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">(Flag Bool -&gt; Bool) -&gt; [Flag Bool] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#all"><span class="hs-identifier hs-var">all</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679619425"><span class="annot"><span class="annottext">Flag Bool
</span><a href="#local-6989586621679619425"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Flag Bool -&gt; Bool
forall a. a -&gt; Flag a -&gt; a
</span><a href="Distribution.Simple.Flag.html#fromFlagOrDefault"><span class="hs-identifier hs-var">fromFlagOrDefault</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">Flag Bool
</span><a href="#local-6989586621679619425"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Flag Bool]
</span><a href="#local-6989586621679619427"><span class="hs-identifier hs-var">flags</span></a></span><span>
</span><span id="line-120"></span><span>                 </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Flag Bool
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-var">Flag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-121"></span><span>                 </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Flag Bool
forall a. Flag a
</span><a href="Distribution.Simple.Flag.html#NoFlag"><span class="hs-identifier hs-var">NoFlag</span></a></span><span>
</span><span id="line-122"></span><span>
</span><span id="line-123"></span><span id="local-6989586621679619707"><span class="annot"><a href="Distribution.Simple.Flag.html#maybeToFlag"><span class="hs-identifier hs-type">maybeToFlag</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679619707"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679619707"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-124"></span><span id="maybeToFlag"><span class="annot"><span class="annottext">maybeToFlag :: forall a. Maybe a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#maybeToFlag"><span class="hs-identifier hs-var hs-var">maybeToFlag</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag a
forall a. Flag a
</span><a href="Distribution.Simple.Flag.html#NoFlag"><span class="hs-identifier hs-var">NoFlag</span></a></span><span>
</span><span id="line-125"></span><span class="annot"><a href="Distribution.Simple.Flag.html#maybeToFlag"><span class="hs-identifier hs-var">maybeToFlag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679619424"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619424"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Flag a
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-var">Flag</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679619424"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-126"></span><span>
</span><span id="line-127"></span><span class="hs-comment">-- | Types that represent boolean flags.</span><span>
</span><span id="line-128"></span><span class="hs-keyword">class</span><span> </span><span id="BooleanFlag"><span class="annot"><a href="Distribution.Simple.Flag.html#BooleanFlag"><span class="hs-identifier hs-var">BooleanFlag</span></a></span></span><span> </span><span id="local-6989586621679619704"><span class="annot"><a href="#local-6989586621679619704"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-129"></span><span>    </span><span id="asBool"><span class="annot"><a href="Distribution.Simple.Flag.html#asBool"><span class="hs-identifier hs-type">asBool</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679619704"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-130"></span><span>
</span><span id="line-131"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Distribution.Simple.Flag.html#BooleanFlag"><span class="hs-identifier hs-type">BooleanFlag</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-132"></span><span>  </span><span id="local-6989586621679619419"><span class="annot"><span class="annottext">asBool :: Bool -&gt; Bool
</span><a href="#local-6989586621679619419"><span class="hs-identifier hs-var hs-var hs-var hs-var">asBool</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-133"></span></pre></body></html>